package com.zjf.carpark.service.impl;


import com.zjf.carpark.dao.SysLogMapper;
import com.zjf.carpark.entities.SysLog;
import com.zjf.carpark.service.SysLogService;
import com.zjf.carpark.vo.SysLogPageVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @description:
 * @author: 张建飞
 * @createDate: 2019/12/20
 * @version: 1.0
 */
@Service
public class SysLogServiceImpl extends BaseServiceImpl<SysLog> implements SysLogService {

    @Autowired
    private SysLogMapper sysLogMapper;

    @Override
    public List<SysLog> selectByMsg(SysLogPageVO sysLogPageVo) {
        if("".equals(sysLogPageVo.getUserName())){
            sysLogPageVo.setUserName(null);
        }
        return sysLogMapper.selectByMsg(sysLogPageVo);
    }

    @Override
    public int totalCount(SysLogPageVO sysLogPageVo) {
        return sysLogMapper.totalCount(sysLogPageVo);
    }
}
